package com.ilearn;

import com.ilearn.autocomplie.entities.EntityModel;
import com.ilearn.utils.SpringContextHolder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.lang.reflect.Method;

/**
 * @author: lyndon
 * @version: 1.0
 * @date: 2019/1/27
 */

@SpringBootApplication
public class ProxyApp {

    public static void main(String[] args) {
        SpringApplication.run(ProxyApp.class, args);

        //EntityModel customBean = SpringContextHolder.getBean(EntityModel.class);



        EntityModel customBean1 = SpringContextHolder.getBean("Members$Entity");
        EntityModel customBean2 = SpringContextHolder.getBean("Rights$Entity");


        System.out.println("Custom Bean:" + customBean1.getClass().getName());
        System.out.println("Custom Bean:" + customBean2.getClass().getName());

        for (Method method : customBean1.getClass().getMethods()) {
            System.out.println(method.getName());
        }



    }
}
